﻿using System.Data.Entity.ModelConfiguration;

namespace HobSoft.SoccerBet2014.Domain.Models.DbSchema
{
    public class BookmakerConfiguration : EntityTypeConfiguration<Bookmaker>
    {
        public BookmakerConfiguration(string schema = "dbo")
        {
            ToTable(schema + ".Bookmaker");
            HasKey(b => b.BmID);
            Property(b => b.BmID).HasColumnName("BmID").IsRequired();
            Property(b => b.BmName).HasColumnName("BmName").IsRequired().HasMaxLength(50);
            Property(b => b.DefaultHost).HasColumnName("DefaultHost").IsRequired().HasMaxLength(200).IsUnicode(false);
            Property(b => b.Available).HasColumnName("Available").IsOptional();
        }
    }
}
